org.eclipse.vtp.framework.common.services
Class DataTypeRegistry

java.lang.Object
  extended by org.eclipse.vtp.framework.common.services.DataTypeRegistry
All Implemented Interfaces:
IDataTypeRegistry, IScriptable

public class DataTypeRegistry
extends java.lang.Object
implements IDataTypeRegistry, IScriptable

Implementation of IDataTypeRegistry.

Author:
Lonnie Pryor

Constructor Summary
DataTypeRegistry(org.eclipse.core.runtime.IExtensionRegistry extensionRegistry, DataTypeConfiguration[] configurations)
          Creates a new DataTypeRegistry.
 
Method Summary
 boolean clearEntry(java.lang.String name)
           
 boolean clearItem(int index)
           
 IDataType getDataType(java.lang.String typeName)
          Returns a type definition for the type with the specified name or null if no type with that name exists.
 java.lang.Object getEntry(java.lang.String name)
           
 java.lang.String[] getFunctionNames()
           
 java.lang.Object getItem(int index)
           
 java.lang.String getName()
           
 boolean hasEntry(java.lang.String name)
           
 boolean hasItem(int index)
           
 boolean hasValue()
           
 java.lang.Object invokeFunction(java.lang.String name, java.lang.Object[] arguments)
           
 boolean setEntry(java.lang.String name, java.lang.Object value)
           
 boolean setItem(int index, java.lang.Object value)
           
 java.lang.Object toValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeRegistry

public DataTypeRegistry(org.eclipse.core.runtime.IExtensionRegistry extensionRegistry,
                        DataTypeConfiguration[] configurations)
Creates a new DataTypeRegistry.

Parameters:
extensionRegistry - The extension registry to use.
configurations - The configurations to use.
Method Detail

getDataType

public final IDataType getDataType(java.lang.String typeName)
                            throws java.lang.NullPointerException
Description copied from interface: IDataTypeRegistry
Returns a type definition for the type with the specified name or null if no type with that name exists.

Specified by:
getDataType in interface IDataTypeRegistry
Parameters:
typeName - The name of the type definition to return.
Returns:
A type definition for the type with the specified name or null if no type with that name exists.
Throws:
java.lang.NullPointerException - If the supplied type name is null.

getName

public final java.lang.String getName()
Specified by:
getName in interface IScriptable

hasValue

public boolean hasValue()
Specified by:
hasValue in interface IScriptable

toValue

public java.lang.Object toValue()
Specified by:
toValue in interface IScriptable

getFunctionNames

public final java.lang.String[] getFunctionNames()
Specified by:
getFunctionNames in interface IScriptable

invokeFunction

public final java.lang.Object invokeFunction(java.lang.String name,
                                             java.lang.Object[] arguments)
Specified by:
invokeFunction in interface IScriptable

hasItem

public final boolean hasItem(int index)
Specified by:
hasItem in interface IScriptable

hasEntry

public final boolean hasEntry(java.lang.String name)
Specified by:
hasEntry in interface IScriptable

getItem

public final java.lang.Object getItem(int index)
Specified by:
getItem in interface IScriptable

getEntry

public final java.lang.Object getEntry(java.lang.String name)
Specified by:
getEntry in interface IScriptable

setItem

public final boolean setItem(int index,
                             java.lang.Object value)
Specified by:
setItem in interface IScriptable

setEntry

public final boolean setEntry(java.lang.String name,
                              java.lang.Object value)
Specified by:
setEntry in interface IScriptable

clearItem

public final boolean clearItem(int index)
Specified by:
clearItem in interface IScriptable

clearEntry

public final boolean clearEntry(java.lang.String name)
Specified by:
clearEntry in interface IScriptable